/**
 * 
 */
package com.hand.cloud.b2b.jobs;

import de.hybris.platform.cronjob.enums.CronJobResult;
import de.hybris.platform.cronjob.enums.CronJobStatus;
import de.hybris.platform.cronjob.model.CronJobModel;
import de.hybris.platform.servicelayer.cronjob.AbstractJobPerformable;
import de.hybris.platform.servicelayer.cronjob.PerformResult;

import org.apache.log4j.Logger;

import com.hand.cloud.b2b.services.LogisticsService;


/**
 * 创建物流信息信息
 * 
 * @author StephenWang
 * @Time Aug 15, 2014 9:15:22 AM
 */
public class LogisticsOperationJob extends AbstractJobPerformable<CronJobModel>
{
	private static final Logger LOG = Logger.getLogger(LogisticsOperationJob.class);


	private LogisticsService logisticsService;

	@Override
	public PerformResult perform(final CronJobModel cronJob)
	{
		LOG.info("-------LogisticsOperationJob-----------");

		System.out.println("-------LogisticsOperationJob-----------");

		this.logisticsService.updateOrderStatus();

		return new PerformResult(CronJobResult.SUCCESS, CronJobStatus.FINISHED);
	}

	/**
	 * @return the logisticsService
	 */
	public LogisticsService getLogisticsService()
	{
		return logisticsService;
	}

	/**
	 * @param logisticsService
	 *           the logisticsService to set
	 */
	public void setLogisticsService(final LogisticsService logisticsService)
	{
		this.logisticsService = logisticsService;
	}
}
